const initialState = {
  channels: [],
  page: 1,
  pageSize: 10,
  list: [],
  total: 0
}

export const reducerArticle = (state = initialState, action) => {
  if (action.type === 'article/channel') {
    return {
      ...state,
      channels: action.payload
    }
  }
  if (action.type === 'article/list') {
    return {
      ...state,
      ...action.payload,
    }
  }
  return state
}